/**
 * @Author: 陈瑞鹏
 * @Date:   2022-11-01 17:31:04
 * @Last Modified by:   陈瑞鹏
 * @Last Modified time: 2022-11-01 17:49:24
 */
import mongoose from 'mongoose';

const Schema = mongoose.Schema;

const RoomLogSchema: mongoose.Schema = new Schema({
  roomId: { type: Number, display: '房间ID', index: true },
  roleId: { type: Number, display: '房主ID', index: true },
  roomData: { type: Array, display: "当前局数数据" },
  round: { type: Number, display: "第几局", default: 0 },
  createTime: { type: String, display: '创建时间' },
}).index({ roomId: 1 });

const RoomLog = mongoose.model('RoomLog', RoomLogSchema);
export default RoomLog;